﻿using System.Windows.Forms;
using Deferred.Editor.Scene;
using Deferred.Library.Scene;

namespace Deferred.Editor.Gui.Scene
{
    public partial class SpotLightPanel : UserControl
    {
        public SpotLightPanel(SpotLight light)
        {
            InitializeComponent();

            spotLightWrapperBindingSource.DataSource = new SpotLightWrapper(light);
            spotLightBindingSource.DataSource = light;
        }

        private void upDownValueChanged(object sender, System.EventArgs e)
        {
            spotLightBindingSource.EndEdit();
        }

        private void wrapperUpDownValueChanged(object sender, System.EventArgs e)
        {
            spotLightWrapperBindingSource.EndEdit();
        }
    }
}
